<?php
  require '../../include/library.inc.php';
  require '../../include/admin_login.inc.php';
    
  $page_id = intval($_GET['page_id']);

  if($page_id) {
	  
	$sql = "DELETE FROM 
               pages
            WHERE
               page_id = '$page_id'
             ";
    query($sql);
	
	$sql = "DELETE FROM 
               page_description
            WHERE
               page_id = '$page_id'
             ";
    query($sql);
				
	$_SESSION['message'] = 'Страницата е изтрита успешно!';
	
  }
  
  redirect($_SERVER['HTTP_REFERER']);
 
?>